package top.minishow.pdf.controller;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

/**
 * @Author: robin he
 * @Date: 2021/9/30 13:23
 * @Desc:
 */
public class TimeTest {
    public static void main(String[] args) {
        String a = "1631203200000";
        long date = StrUtil.isNotBlank(a) ? Long.parseLong(a) : System.currentTimeMillis();
        String orderDate = DateUtil.format(DateUtil.date(date), DatePattern.NORM_DATETIME_PATTERN);
        System.out.println(orderDate);
    }
}
